#define _CRT_SECURE_NO_WARNINGS 1


#include<vector>
#include<algorithm>
#include<iostream>

using namespace std;

int main()
{
	int n = 0;
	cin >> n;
	vector<int> v(n);
	for (int i = 0; i < n; i++)
	{
		cin >> v[i];
	}
	int m = 0;
	cin >> m;
	
	vector<int> v_temp;
	int temp = 0;
	for (int i = 0; i < m; i++)
	{
		v_temp.push_back(v[i]);
		temp = v[i];
	}

	sort(v_temp.begin(), v_temp.end(), greater<int>());
	
	for (int i = 0; i < m; i++)
	{
		if (v_temp[i] == temp)
		{
			cout << i + 1 << endl;
		}
	}

	return 0;
}